package com.shell.governor.audit.remote.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.shell.bee.base.utils.StringUtil;
import com.shell.bee.persistence.annotation.Pagination;
import com.shell.bee.persistence.model.PageLimit;
import com.shell.bee.persistence.service.impl.PersistentServiceImpl;
import com.shell.governor.audit.po.PubRemote;
import com.shell.governor.audit.remote.service.PubRemoteService;

import tk.mybatis.mapper.entity.Example;

@Service("pubRemoteServiceImpl")
public class PubRemoteServiceImpl extends PersistentServiceImpl<PubRemote> implements PubRemoteService {
	@Pagination
	public List<PubRemote> queryList(PageLimit limit, String sTime, String eTime) {
		Example example = new Example(PubRemote.class);
		Example.Criteria criteria = example.createCriteria();
		if ((StringUtil.notTrimEmpty(sTime)) && (StringUtil.notTrimEmpty(eTime))) {
			criteria.andBetween("reqTime", sTime + " 00:00:00", eTime + " 23:59:59");
		}
		return selectByExample(example);
	}

	public boolean recordData() {
		return false;
	}
}
